package remoteService;

import concole.Course;
import concole.Teacher;
import gui.*;

public class RemoteTeacherBoard extends TeacherBorad {

	public RemoteTeacherBoard() {
		super();
		isRemote = true;

	}

	public RemoteTeacherBoard(String ID, int identity) {
		super(ID, identity);
		user = new Teacher(ID);
		isRemote = true;
	}

	@Override
	protected void updateTeacherListFile(Course oldCourse, Course newCourse,
			boolean ifCnumChange, boolean ifTChange) {
		// TODO Auto-generated method stub
		user.processNetUpdateTList(oldCourse, newCourse, ifCnumChange,
				ifTChange);
	}

/*	@Override
	protected String getTeacherNameFromFile(String numString) {
		// TODO Auto-generated method stub
		String resultString = user.processNetGetTNameFromFile(numString);
		return resultString;
	}
*/
	@Override
	protected void publishCourse(Course course) {
		// TODO Auto-generated method stub
		System.out.println("in remotePublish" + course.toTransferString() + " \n"
				+ course.teachers.toString());
		user.processNetPublish(course);
	}

	@Override
	protected boolean checkCouseNum(String courseNumber) {
		// TODO Auto-generated method stub
		boolean returnB = user.processNetCheckCNum(courseNumber);
		return returnB;

	}

	@Override
	protected void updateCourseList(Course oldCourse, Course newCourse) {
		// TODO Auto-generated method stub
		user.processNetUpdateCList(oldCourse, newCourse);
	}

	@Override
	protected String[] showAllCourse(String teacherNum) {
		// TODO Auto-generated method stub
		String[] resultStrings = user.processNetShowAllCourse(teacherNum);
		return resultStrings;
	}

	@Override
	protected String[] showStudentsScore(String courseNum) {
		// TODO Auto-generated method stub
		String[] resultStrings = user.processNetShowSScore(courseNum);
		return resultStrings;
	}

	@Override
	protected String[] showStudent(String courseNum) {
		// TODO Auto-generated method stub

		String[] resultStrings = user.processNetShowStu(courseNum);
		return resultStrings;
	}

	@Override
	protected void recordScore(String[] tostoreStrings) {
		// TODO Auto-generated method stub
		user.processNetRecordScore(tostoreStrings);
	}

	@Override
	protected String[] showCourse(String courseNum) {
		// TODO Auto-generated method stub
		return user.processNetShowCourse(courseNum);
	}

	

	@Override
	public boolean hasRight(String courseNum) {
		// TODO Auto-generated method stub
		boolean hasRight = false;
		hasRight = user.processNetHasRight(this.ID, courseNum);
		return hasRight;
	}
}
